package com.hrg.gys.clfr.myapplication;

import android.util.Log;

import androidx.annotation.NonNull;

import java.util.Arrays;
import java.util.List;

public class Animal {
    public static int num = 1;
    public static String tt = "1";
    public String name;
    public int age;

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @NonNull
    @Override
    public String toString() {
        StringBuilder field2 = new StringBuilder();
        field2.append("【static num： " + num);
        field2.append(";static tt： " + tt);
        field2.append(";name： " + name);
        field2.append(";age： " + age + "]");
        return field2.toString();
    }

    public String getName() {
        return name;
    }

    public static String callStatic(String string) {
        log("callStatic() called " + string);
        return string + "  java";
    }

    private static void log(String string) {
        Log.d("native Animal", string);
    }

    public static String callStatic2(String[] strings, int t) {
        log("callStatic() callStatic2 " + Arrays.toString(strings) + t);
        return " callStatic2 java";
    }

    public static String callStatic3(List<String> strings, int t) {
        log("callStatic() callStatic3 ");
        return t + "  java";
    }

    public int getAge() {
        return age;
    }

}
